Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forum perms shortcode templatization #5384

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rica-carv
Copy link
Contributor

Motivation and Context

Remove harcoded HTML form PERMS forum shortcode

Description

Moved embebed HTML to template

How Has This Been Tested?

Tested in latest Github e107 code

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist

Copy link

codeclimate bot commented Jan 11, 2025

Code Climate has analyzed commit a50469c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 39.3% (0.3% change).

View more on Code Climate.


return implode("<span class='forum-perms-separator'><!-- --></span>", $permDisplay);

global $FORUM_VIEWFORUM_TEMPLATE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using global is very PHP5. Please load the template. It can be done in the construct()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the way the forum code is written. The template is already loaded in the main forum_view.php code, and for me it was a overload to load the template twice...
There's another way to do it. Pass the template via sc var, but that would require rewrite the main php file code....
Anyway all the forum code needs a major rewrite, it's poorly programmed...

If i'm allowed, i can do it...

Copy link
Member

@Moc Moc Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for quite some time I've been considering a rewrite from scratch of the forum plugin but while still keeping the same database structure.

We could start a rewrite as a new plugin in a separate repository. Then at some point it can be merged into core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants